--[[

ShortKey Config File 2009.8.30

Author : simonw
From CWDG http://bbs.cwowaddon.com/thread-805-1-1.html

完成参数列表:

ShortKey.Config[index] = {
	Class = "[classname]",
	Character = "[palyername]",
	Race = "[racename]",
	Talent = 1 | 2 | nil,
	IsLoad = function
	{Key = "[keyname]", Type = "[type]", Value = "[value]",	Condition = "[cond]" | nil, Target = "[unit]" | nil, TargetFrames = "[framname1], [framname2], ..." | nil, Comment = "[comment]" | nil},
	...
}

通用参数说明: (所有参数均为字符串类型)
Group参数:
Class: 职业名称
Character: 角色名称
Race: 角色种族, 当职业,角色名称,种族都省略时默认为全局有效, 若有职业则载入职业配置, 若有角色则载入角色配置. 依赖配置顺序载入因此需要保证全局配置最前, 职业配置其次, 角色配置最后, 如果冲突后面的配置会覆盖前面的配置.
Talent: 双天赋选择参数, 整数1或者2
IsLoad: 默认为空使用系统条件函数, 可自定义条件函数, 返回true则载入此配置组.
Items:..

Item参数:
Key: 绑定的键盘或鼠标按键.
Type: 动作类型, 常用枚举值包含action,spell,item,marco,stop,target,focus,assist,menu,command
Value: 不同动作Type对应值不同.
Target: 通常为target,player,targettarget,focus,partyN,raidN...
Condition: 标准宏条件语法, 以方括号括起.
TargetFrames: 以逗号分隔开的窗体名字, 用于定义将鼠标按键绑定于之上的窗体, 可以是系统窗体也可以是用户自定义窗体.
Comment: 注释, 未来版本会有大用途.

-------------------------------- ShortKey 配置说明 --------------------------------

type = actionbar
action = "increment" | "decrement" | "[num]" | "[numN]:[numM]"

type = action
action = "[num]"

type = pet
action = "[num]"

type = spell
spell = "[spellname]"

type = item
...

type = macro
macro = "[num]" | "[macroname]" | macrotext
macrotext = "[macrobody]"

type = cancelaura

type = stop

type = target

type = focus

type = assist

type = maintank

type = mainassist

type = click

type = attribute

]]--
local oplayer = "oUF_Tukz_player"
local otarget = "oUF_Tukz_target"
local PARTYMEMBERFRAMES = "PartyMemberFrame1,PartyMemberFrame2,PartyMemberFrame3,PartyMemberFrame4"
--[[local oraid = "oUF_Group1UnitButton1, oUF_Group1UnitButton2, oUF_Group1UnitButton3, oUF_Group1UnitButton4, oUF_Group1UnitButton5,
			oUF_Group2UnitButton1, oUF_Group2UnitButton2, oUF_Group2UnitButton3, oUF_Group2UnitButton4, oUF_Group2UnitButton5,
			oUF_Group3UnitButton1, oUF_Group3UnitButton2, oUF_Group3UnitButton3, oUF_Group3UnitButton4, oUF_Group3UnitButton5,
			oUF_Group4UnitButton1, oUF_Group4UnitButton2, oUF_Group4UnitButton3, oUF_Group4UnitButton4, oUF_Group4UnitButton5,
			oUF_Group5UnitButton1, oUF_Group5UnitButton2, oUF_Group5UnitButton3, oUF_Group5UnitButton4, oUF_Group5UnitButton5,
			oUF_Group6UnitButton1, oUF_Group6UnitButton2, oUF_Group6UnitButton3, oUF_Group6UnitButton4, oUF_Group6UnitButton5,
			oUF_Group7UnitButton1, oUF_Group7UnitButton2, oUF_Group7UnitButton3, oUF_Group7UnitButton4, oUF_Group7UnitButton5,
			oUF_Group8UnitButton1, oUF_Group8UnitButton2, oUF_Group8UnitButton3, oUF_Group8UnitButton4, oUF_Group8UnitButton5, "]]
			
			

--command值的定义参见http://wiki.cwowaddon.com/BindingName
--group1
ShortKey.Config[1] = {
	Comment = "全局日常功能键配置",
	{Key = "E", Type = "command", Value = "MOVEFORWARD", Comment = "前"},
	{Key = "D", Type = "command", Value = "MOVEBACKWARD", Comment = "后"},
	{Key = "S", Type = "command", Value = "STRAFELEFT", Comment = "左"},
	{Key = "F", Type = "command", Value = "STRAFERIGHT", Comment = "右"},
	{Key = "B", Type = "command", Value = "OPENALLBAGS", Comment = "包裹"},
	{Key = "Y", Type = "command", Value = "REPLY", Comment = "回复"},
	{Key = "F5", Type = "command", Value = "TOGGLECHARACTER0", Comment = "角色"},
	{Key = "F6", Type = "command", Value = "TOGGLESPELLBOOK", Comment = "法术书"},
	{Key = "F7", Type = "command", Value = "TOGGLETALENTS", Comment = "天赋"},
	{Key = "F8", Type = "command", Value = "TOGGLEQUESTLOG", Comment = "任务"},
	{Key = "F9", Type = "command", Value = "TOGGLESOCIAL", Comment = "社交"},
	{Key = "F10", Type = "command", Value = "TOGGLEWORLDMAP", Comment = "大地图"},
	{Key = "F11", Type = "command", Value = "TOGGLEBATTLEFIELDMINIMAP", Comment = "小地图"},
	{Key = "F12", Type = "command", Value = "TOGGLELFGPARENT", Comment = "组队"},
	{Key = "ESCAPE", Type = "command", Value = "TOGGLEGAMEMENU", Comment = "主菜单"},
	{Key = "[", Type = "macro", Value = "/click NoruFrame", Comment = "随机坐骑"},
	{Key = "]", Type = "macro", Value = "/CLICK CorkFrame", Comment = "Cork"},
}

--group2
ShortKey.Config[2] = {
	Class = "圣骑士",
	{Key = "[", Type = "macro", Value = "/use [nocombat,outdoors,flyable] 迅捷黄色驭风者;迅捷幽灵虎", Comment = "坐骑"},
	{Key = "SHIFT-G", Type = "spell", Value = "智慧审判", Target = "target", Comment = "智慧审判"},
	{Key = "CTRL-G", Type = "spell", Value = "圣光审判", Target = "target", Comment = "圣光审判"},
	{Key = "W", Type = "macro", Value ="/startattack\n/cast 十字军打击\n/cast 神圣震击"},
	{Key = "R", Type = "spell", Value = "制裁之锤", Target = "target", Comment = "制裁之锤"},
	{Key = "SHIFT-R", Type = "spell", Value = "愤怒之锤", Target = "target", Comment = "愤怒之锤"},
	{Key = "Q", Type = "spell", Value = "清洁术", Target = "player", Comment = "自己清洁术"},
	{Key = "T", Type = "spell", Value = "圣盾术"},
	{Key = "A", Type = "spell", Value = "自由之手", Target = "player", Comment = "自己自由之手"},
	{Key = "Z", Type = "spell", Value = "奉献", Comment = "奉献"},
	{Key = "LeftButton", Type = "spell", Value = "圣光闪现", Condition = "[help]", TargetFrames = otarget, Comment = "鼠标左键目标圣光闪现"},
	{Key = "MiddleButton", Type = "spell", Value = "清洁术", TargetFrames = oplayer, otarget, Comment = "鼠标中键自己目标清洁术"},
}

ShortKey.Config[3] = {
	Class = "圣骑士",
	Talent = 1,
	Comment = "惩戒副本天赋",
	{Key = "G", Type = "macro", Value = "/startattack\n/cast 智慧审判", Comment = "智慧审判"},
	{Key = "SHIFT-W", Type = "spell", Value = "驱邪术", Target = "target", Comment = "驱邪术"},
	{Key = "`", Type = "macro", Value ="/castsequence reset=shift,10 鲜血圣印,强效力量祝福,惩戒光环", Target = "player", Comment = "鲜血,力量,惩戒光环"},
}

ShortKey.Config[4] = {
	Class = "圣骑士",
	Talent = 2,
	Comment = "惩戒PVP天赋",
	{Key = "G", Type = "macro", Value = "/startattack\n/cast 公正审判", Comment = "公正审判"},
	{Key = "`", Type = "macro", Value ="/castsequence reset=shift,10 命令圣印,强效力量祝福,惩戒光环", Target = "player", Comment = "命令,力量,惩戒光环"},
}

ShortKey.Config[5] = {
	Class = "萨满祭司",
	{Key = "`", Type = "spell", Value = "闪电之盾"},
	{Key = "SHIFT-T", Type = "spell", Value = "图腾召唤"},
	{Key = "G", Type = "spell", Value = "净化术", Target = "target"},
	{Key = "[", Type = "macro", Value = "/use [nocombat,outdoors,flyable] 黑色灵翼幼龙;迅捷森林狼", Comment = "上下鸟马"},
	{Key = "Q", Type = "spell", Value = "烈焰震击", Target = "target"},
	{Key = "Z", Type = "spell", Value = "大地震击", Target = "target"},
	{Key = "SHIFT-Q", Type = "spell", Value = "冰霜震击", Target = "target"},
	{Key = "ALT-R", Type = "spell", Value = "次级治疗波", Target = "player"},
	{Key = "ALT-W", Type = "spell", Value = "治疗波", Target = "player"},
	{Key = "LeftButton", Type = "spell", Value = "次级治疗波", Condition = "[help]", TargetFrames = otarget },
}

ShortKey.Config[6] = {
	Class = "萨满祭司",
	Talent = 1,
	Comment = "元素天赋",
	{Key = "A", Type = "spell", Value = "雷霆风暴", Comment = "阳春雷霆风暴"},
	{Key = "T", Type = "spell", Value = "元素掌握"},
	{Key = "ALT-1", Type = "spell", Value = "空气之怒图腾"},
	{Key = "ALT-3", Type = "spell", Value = "火焰新星图腾"},
	{Key = "ALT-3", Type = "spell", Value = "净化图腾"},
}

ShortKey.Config[7] = {
	Class = "萨满祭司",
	Talent = 2,
	Comment = "恢复天赋",
	{Key = "W", Type = "spell", Value = "治疗波"},
	{Key = "R", Type = "spell", Value = "治疗链"},
	{Key = "ALT-1", Type = "spell", Value = "空气之怒图腾"},
	{Key = "ALT-3", Type = "spell", Value = "火焰新星图腾"},
	{Key = "ALT-3", Type = "spell", Value = "净化图腾"},
}

ShortKey.Config[8] = {
	Class = "德魯伊",
	Comment = "XD台服",
	{Key = "ALT-1", Type = "macro", Value = "/cast [nostance:1]巨熊形態;", Comment = "非熊变熊"},
	{Key = "ALT-2", Type = "macro", Value = "/cast [nostance:3]獵豹形態; \n/cast [nostealth] 潛行", Comment = "非猫变猫，是猫则潜"},
	{Key = "ALT-3", Type = "macro", Value = "/cast [nostance:5,outdoors,nocombat,flyable,noswimming]迅捷飛行形態 \n/cast [nostance:4,outdoors,noswimming,nostance:5]旅行形態 \n/cast [nostance:2,swimming]水棲形態 \n/cast [nostance:3,indoors]獵豹形態 \n/script UIErrorsFrame:Clear()", Comment = "快捷变身"},
	{Key = "ALT-E", Type = "spell", Value = "癒合", Target = "player", Conditon = "[nostance]", Comment = "给自己愈合"},
	{Key = "`", Type = "macro", Value = "/cast [mod:alt,target=player]解除诅咒;[stance:1,nohelp] 野性衝鋒 - 熊形態; [stance:3,nohelp] 野性衝鋒 - 獵豹形態;[nostance:1/3,nohelp]精灵之火;[help]解除诅咒"},
	--{Key = "Q", Type = "macro", Value = "/cast [mod:alt,target=player]驅毒術;[stance:1/3,nohelp]精靈之火(野性);[nostance:1/3,nohelp]精靈之火;[help]驅毒術"},
	{Key = "Q", Type = "macro", Value = "/cast 精靈之火", Target = "target", Condition = "[nostance:1/3,nohelp]"},
	{Key = "Q", Type = "macro", Value = "/cast 驅毒術", Target = "target", Condition = "[nostance,help]"},
	{Key = "Q", Type = "macro", Value = "/startattack\n/cast 精靈之火(野性)", Target = "target", Condition = "[stance:1/3,nohelp]"},
	{Key = "ALT-Q", Type = "spell", Value = "樹皮術", Target = "player", Conditon = "[stance:1/3]"},
	--{Key = "W", Type = "macro", Value = "/cast [nostance,help] 回春術; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	{Key = "W", Type = "macro", Value = "/cast 愤怒", Target = "target", Condition = "[nostance:1/3,nohelp]"},
	{Key = "W", Type = "macro", Value = "/cast 回春術", Target = "target", Condition = "[nostance,help]"},
	{Key = "W", Type = "macro", Value = "/startattack\n/cast 割碎(熊形態)", Target = "target", Condition = "[stance:1,nohelp]"},
	{Key = "W", Type = "macro", Value = "/startattack\n/cast 割碎(獵豹形態)", Target = "target", Condition = "[stance:3,nostealth]"},
	{Key = "W", Type = "macro", Value = "/cast 突襲", Target = "target", Condition = "[stealth]"},
	{Key = "ALT-W", Type = "spell", Value = "回春術", Target = "player", Conditon = "[nostance]", Comment = "给自己回春"},
	--{Key = "R", Type = "macro", Value = "/cast [nostance,help] 生命之花; [nostance,nohelp] 星火術; [stance:1,nohelp] 割裂; [stance:3,nostealth,nohelp] 撕碎; [stealth,nohelp] 毁灭"},
	{Key = "R", Type = "macro", Value = "/cast 星火術", Target = "target", Condition = "[nostance:1/3,nohelp]"},
	{Key = "R", Type = "macro", Value = "/cast 生命之花", Target = "target", Condition = "[nostance,help]"},
	{Key = "R", Type = "macro", Value = "/startattack\n/cast 割裂", Target = "target", Condition = "[stance:1,nohelp]"},
	{Key = "R", Type = "macro", Value = "/startattack\n/cast 撕碎", Target = "target", Condition = "[stance:3,nostealth]"},
	{Key = "R", Type = "macro", Value = "/startattack\n/cast 毁灭", Target = "target", Condition = "[stealth]"},
	{Key = "ALT-R", Type = "spell", Value = "生命之花", Target = "player", Conditon = "[nostance]", Comment = "给自己三花"},
	{Key = "T", Type = "macro", Value = "/cast [nostance,help] 癒合; [nostance,nohelp] 颶風術; [stance:1,nohelp] 低吼 ; [stance:3,nohelp] 兇猛撕咬"},
	{Key = "G", Type = "macro", Value = "/cast [nostance,help] 癒合; [nostance,nohelp] 糾纏根鬚; [stance:1,nohelp] 重擊; [stance:3,nohelp] 撕扯"},
	{Key = "V", Type = "macro", Value = "/cast [nostance,help] 癒合; [nostance,nohelp] 星火术; [stance:1,nohelp] 挫志咆哮; [stance:3,nohelp] 兇蠻咆哮"},
	--{Key = "A", Type = "macro", Value = "/cast [nostance] 颶風; [stance:1,nohelp] 揮擊(熊形態); [stance:3,nohelp] 揮擊(獵豹形態) \n/startattack", Comment = "AOE"},
	{Key = "A", Type = "spell", Value = "颶風", Condition = "[nostance,nohelp]"},
	{Key = "A", Type = "spell", Value = "回春術", Target = "target", Condition = "[nostance,help]"},
	{Key = "A", Type = "macro", Value = "/startattack\n/cast 揮擊(熊形態)", Target = "target", Condition = "[stance:1]"},
	{Key = "A", Type = "macro", Value = "/startattack\n/cast 揮擊(獵豹形態)", Target = "target", Condition = "[stance:3]"},
	{Key = "ALT-A", Type = "spell", Value = "求生本能", Target = "player", Conditon = "[stance:1/3]"},
	{Key = "Z", Type = "macro", Value = "/cast 颶風", Target = "target", Condition = "[nostance:1/3,nohelp]"},
	{Key = "Z", Type = "macro", Value = "/cast 回春術", Target = "target", Condition = "[nostance,help]"},
	{Key = "Z", Type = "macro", Value = "/startattack\n/cast 揮擊(熊形態)", Target = "target", Condition = "[stance:1,nohelp]"},
	--{Key = "1", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	--{Key = "2", Type = "macro", Value = "/cast [nostance,help] 癒合; [nostance,nohelp] 愤怒; [stance:1,nohelp] 槌擊; [stance:3,nostealth,nohelp] 掃擊; [stealth,nohelp] 突襲"},
	--{Key = "1", Type = "macro", Value = "/cast 星火術", Target = "target", Condition = "[nostance:1/3,nohelp]"},
	--{Key = "1", Type = "macro", Value = "/cast 治療之觸", Target = "target", Condition = "[nostance,help]"},
	{Key = "1", Type = "macro", Value = "/startattack\n/cast 槌擊", Target = "target", Condition = "[stance:1,nohelp]"},
	{Key = "1", Type = "macro", Value = "/cast 狂暴 \n/use 13 \n/use 14", Target = "player", Condition = "[stance:3,nohelp]"},
	--{Key = "2", Type = "macro", Value = "/cast 星火術", Target = "target", Condition = "[nostance:1/3,nohelp]"},
	--{Key = "2", Type = "macro", Value = "/cast 治療之觸", Target = "target", Condition = "[nostance,help]"},
	{Key = "2", Type = "macro", Value = "/startattack\n/cast 揮擊(熊形態)", Target = "target", Condition = "[stance:1,nohelp]"},
	{Key = "2", Type = "spell", Value = "猛虎之怒", Target = "player", Condition = "[stance:3,nohelp]"},
	--{Key = "3", Type = "macro", Value = "/cast 星火術", Target = "target", Condition = "[nostance:1/3,nohelp]"},
	--{Key = "3", Type = "macro", Value = "/cast 治療之觸", Target = "target", Condition = "[nostance,help]"},
	{Key = "3", Type = "macro", Value = "/startattack\n/cast 槌擊", Target = "target", Condition = "[stance:1,nohelp]"},
	{Key = "3", Type = "macro", Value = "/startattack\n/cast 掃擊", Target = "target", Condition = "[stance:3,nohelp]"},
	--{Key = "3", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	--{Key = "4", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	--{Key = "5", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	--{Key = "6", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	--{Key = "7", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	--{Key = "8", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	--{Key = "9", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	--{Key = "0", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	--{Key = "-", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	--{Key = "=", Type = "macro", Value = "/cast [nostance,help] 治療之觸; [nostance,nohelp] 愤怒; [stance:1,nohelp] 割碎(熊形態); [stance:3,nostealth,nohelp] 割碎(獵豹形態); [stealth,nohelp] 突襲"},
	}

ShortKey.Config[9] = {
	Class = "德鲁伊",
	Comment = "XD国服",
	{Key = "ALT-1", Type = "macro", Value = "/cast [nostance:1]巨熊形态(变形);", Comment = "非熊变熊"},
	{Key = "ALT-2", Type = "macro", Value = "/cast [nostance:3]猎豹形态(变形); \n/cast [nostealth] 潜行", Comment = "非猫变猫，是猫则潜"},
	{Key = "ALT-3", Type = "macro", Value = "/cast [nostance:5,outdoors,nocombat,flyable,noswimming]迅捷飞行形态 \n/cast [nostance:4,outdoors,noswimming]旅行形态(变形) \n/cast [nostance:2,swimming]水栖形态(变形) \n/cast [nostance:3,indoors]猎豹形态 \n/script UIErrorsFrame:Clear()", Comment = "快捷变身"},
	{Key = "ALT-4", Type = "macro", Value = "/cast [nostance:5]枭兽形态;\n/cast [nostance:5]树人形态;"},
	{Key = "`", Type = "macro", Value = "/cast [mod:alt,target=player]解除诅咒;[stance:1,nohelp] 野性冲锋 - 熊; [stance:3,nostealth,nohelp] 野性冲锋 - 豹;[nostance:1/3,nohelp]精灵之火;[help]解除诅咒"},
	{Key = "Q", Type = "macro", Value = "/cast [mod:alt,target=player]驱毒术;[stance:1/3,nohelp]精灵之火（野性）;[nostance:1/3,nohelp]精灵之火;[help]驱毒术"},
	{Key = "W", Type = "macro", Value = "/cast [nostance,help] 回春术; [nostance,nohelp] 愤怒; [stance:1,nohelp] 裂伤（熊）; [stance:3,nostealth,nohelp] 裂伤（豹）; [stealth,nohelp] 突袭"},
	{Key = "R", Type = "macro", Value = "/cast [nostance,help] 生命绽放; [nostance,nohelp] 星火术; [stance:1,nohelp] 割伤; [stance:3,nostealth,nohelp] 撕碎 ; [stealth,nohelp] 毁灭"},
	{Key = "T", Type = "macro", Value = "/cast [nostance,help] 愈合; [nostance,nohelp] 旋风; [stance:1,nohelp] 低吼 ; [stance:3,nohelp] 凶猛撕咬"},
	{Key = "G", Type = "macro", Value = "/cast [nostance,help] 愈合; [nostance,nohelp] 纠缠须根; [stance:1,nohelp] 猛击 ; [stance:3,nohelp] 割裂"},
	{Key = "A", Type = "macro", Value = "/cast [nostance] 旋风; [stance:1,nohelp] 横扫（熊）; [stance:3,nohelp] 凶猛撕咬\n/startattack", Comment = "AOE"},
	{Key = "ALT-W", Type = "spell", Value = "回春术", Target = "player", Conditon = "[nostance]", Comment = "給自己回春"},
	{Key = "ALT-R", Type = "spell", Value = "生命绽放", Target = "player", Conditon = "[nostance]", Comment = "給自己绽放"},
	{Key = "ALT-E", Type = "spell", Value = "愈合", Target = "player", Conditon = "[nostance]", Comment = "給自己愈合"},
}